<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr = [12,3,9,8,14];
        // let c= arr.sort((a,b)=>{
        //     return a-b;
        // })

        // let d = arr.sort((a,b)=>{
        //     return b-a;
        // })
        // // console.log(c);
        // console.log(d);
        let str = arr.join("|");
        console.log(str)
    </script>
</body>
</html>